package com.itheima.抽象类.抽象类组成_02;

public abstract class Animal {
    private String age;

    public abstract void eat();
    public Animal() {
    }
    public Animal(String age) {
        this.age = age;
    }
    public String getAge() {
        return age;
    }
    public void setAge(String age) {
        this.age = age;
    }
}

class Cat extends Animal{
    public Cat(){
        super(); // 访问父类的无参构造
    }

    @Override
    public void eat() {
        System.out.println("猫吃鱼");
    }
}
